<style>
    #hazardExamineRecord-edit .layui-input-block{
        margin-left: 145px;
    }
    #hazardExamineRecord-edit .layui-form-label {
        width: 110px;
    }
</style>
<div class="febs-container" id="hazardExamineRecord-edit">
    <div class="febs-open-body">
        <form class="layui-form" action="" lay-filter="hazardExamineRecord-edit-form">
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">安全检查信息</blockquote>
                <div class="layui-card-body " id="box-detail">

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail">公司名称：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.tenantName}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">检查类别：</label>
                                <div th:switch="${hazardExamine.examineCategory}">
                                    <div th:case="1" class="layui-input-block layui-input-block-html">日常</div>
                                    <div th:case="2" class="layui-input-block layui-input-block-html">专项</div>
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">检查类型：</label>
                                <div th:switch="${hazardExamine.examineType}">
                                    <div th:case="1" class="layui-input-block layui-input-block-html">公司检查</div>
                                    <div th:case="2" class="layui-input-block layui-input-block-html">部门检查</div>
                                    <div th:case="3" class="layui-input-block layui-input-block-html">车间检查</div>
                                    <div th:case="4" class="layui-input-block layui-input-block-html">班组检查</div>
                                    <div th:case="5" class="layui-input-block layui-input-block-html">项目检查</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail">检查主题：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.examineTitle}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail">开始时间：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.startDate}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label layui-form-label-detail ">结束时间：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardExamine.endDate}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail">检查小组：</label>
                                <div class="layui-input-block layui-input-block-html">
                                    <table lay-filter="groupUserTable" id="groupUserTable" lay-data="{id: 'groupUserTable'}"></table>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <!--            整改退回记录-->
            <div class="layui-card" th:if="${not #lists.isEmpty(hazardExamineRecord.rectifyReturnRecordList)}">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">整改退回信息</blockquote>
                <div class="layui-card-body " id="box-rectifyReturn">

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <label class="layui-form-label layui-form-label-detail">整改退回记录：</label>
                            <div class="layui-input-block">
                                <div class="jhg-body-table">
                                    <table lay-filter="rectifyReturnTable" id="rectifyReturnTable" lay-data="{id: 'rectifyReturnTable'}"></table>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">录入信息</blockquote>
                <div class="layui-card-body " id="box-info">
                    <div class="layui-form-item febs-hide">
                        <label class="layui-form-label">主键：</label>
                        <div class="layui-input-block">
                            <input type="text" name="examineId" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label febs-form-item-require">安全检查内容：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="hazardExamineTitle" autocomplete="off" class="layui-input" lay-verify="required" placeholder="请输入安全检查内容">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">隐患类型：</label>
                                <div class="layui-input-block">
                                    <select name="hazardOperation" id="hazardOperation" lay-verify="required">
                                        <option value="">请选择</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">隐患等级：</label>
                                <div class="layui-input-block">
                                    <select name="hazardLevel" id="hazardLevel" lay-verify="required">
                                        <option value="">请选择</option>
                                        <option value="1">轻微隐患</option>
                                        <option value="2">一般隐患</option>
                                        <option value="3">重大隐患</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label febs-form-item-require ">项目名称：</label>
                                <div class="layui-input-block">
                                    <select name="projectId" id="projectId" lay-filter="projectId" lay-verify="required">
                                        <option value="">请选择</option>
                                        <option th:each="item:${projectList}"
                                                th:value="${item.projectId}" th:text="${item.projectName}"
                                                th:selected="${hazardExamineRecord.projectId ==item.projectId}"
                                        >
                                        <input type="text" name="projectName" class="febs-hide">
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label febs-form-item-require ">隐患区域：</label>
                            <div class="layui-input-block">
                                <select name="areaId" id="areaId" lay-search="" lay-filter="areaId" lay-verify="required">
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">是否整改：</label>
                                <div class="layui-input-block">
                                    <input type="checkbox" id="rectificationFlg" name="rectificationFlg" lay-skin="switch"  lay-text="是|否"
                                           lay-filter="rectificationFlg">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" name="ifShow">
                        <div class="layui-row">
                            <div class="layui-col-xs4">
                                <label id="leaderName-label" class="layui-form-label febs-form-item-require">责任人姓名：</label>
                                <div class="layui-input-block" style="position: relative">
                                    <input type="text" name="leaderId" class="febs-hide">
                                    <input type="text" name="leaderName" autocomplete="off" class="layui-input"
                                           minlength="2" maxlength="10"  id="inputAutoLeader">
                                    <div class="layui-input-suffix" id="leaderUserSelect">
                                        <i class="layui-icon layui-icon-add-1"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <label class="layui-form-label">责任部门：</label>
                                <div class="layui-input-block layui-input-block-html">
                                    <input type="text" name="leaderDeptId" class="febs-hide">
                                    <input type="text" name="leaderDeptName" autocomplete="off" class="layui-input febs-hide"
                                           minlength="2" maxlength="10" disabled>
                                    <span id="recordDeptNameDiv">
                                    </span>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <label class="layui-form-label">责任人工号：</label>
                                <div class="layui-input-block layui-input-block-html" style="position: relative">
                                    <input type="text" name="leaderNo" autocomplete="off" class="layui-input febs-hide"
                                           minlength="2" maxlength="10" placeholder="选择责任人后自动带出" disabled >
                                    <span id="leaderUserNoDiv">
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" name="ifShow">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label id="rectificationDeadline-label" class="layui-form-label febs-form-item-require">整改期限：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="rectificationDeadline" id="rectificationDeadline"
                                           placeholder="请输入期限时间" autocomplete="off" class="layui-input" lay-verify="required">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" name="ifShow">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label id="rectificationRequire-label" class="layui-form-label febs-form-item-require">整改要求：</label>
                                <div class="layui-input-block">
                                        <textarea type="text" name="rectificationRequire" autocomplete="off" class="layui-textarea" minlength="2"
                                                  maxlength="8" placeholder="请输入整改要求" lay-verify="required"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" name="ifShow">
                        <div class="layui-row">
                            <label class="layui-form-label ">问题图片：</label>
                            <div class="layui-input-block">
                                <div id="fileUpload" style="height: 120px ;width: 100%">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" name="ifShow">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label id="questionDescription-label" class="layui-form-label febs-form-item-require">问题描述：</label>
                                <div class="layui-input-block">
                                        <textarea type="text" name="questionDescription" autocomplete="off" class="layui-textarea" minlength="2"
                                                  maxlength="800" placeholder="请输入问题描述" lay-verify="required"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label febs-form-item-require">检查依据：</label>
                                <div class="layui-input-block">
                                        <textarea type="text" name="examineEvidence" autocomplete="off" class="layui-textarea" minlength="2"
                                                  maxlength="800" placeholder="请输入检查依据" lay-verify="required"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>


            <div class="layui-form-item febs-hide">
                <button class="layui-btn" lay-submit="" lay-filter="hazardExamineRecord-edit-form-save" id="save"></button>
                <button class="layui-btn" lay-submit="" lay-filter="hazardExamineRecord-edit-form-submit" id="submit"></button>
                <button type="reset" class="layui-btn" id="reset"></button>
            </div>
        </form>
    </div>
</div>
<script data-th-inline="javascript">
    var hazardExamineRecordData = [[${hazardExamineRecord}]];
    var hazardExamineData = [[${hazardExamine}]];
</script>
<script th:src="@{/febs/js/hazard/hazardExamineRecord/hazardExamineRecordEdit.js(v=1)}"></script>